<?php

/*
	DEPRECATED: use spTable
*/

class spTableExt extends spTable
{
	public function __construct( $data=null )
	{
		parent::__construct( $data );
		parent::setClass( "CSSTableGenerator" );
		
		if ( isset($data["col_array"]) )
		{
			$row = new spTableRow;
			parent::addChild( $row );
			
			foreach ( $data["col_array"] as $col )
			{
				$d = new spTableData;
				$d->addChild( $col );
				$row->addChild( $d );
			}
		}
	}
	
	public function setHeader( $arHeader )
	{
		$header = new spTableRow;
	
		foreach ( $arHeader as $c )
			$header->addChild( new spTableData( array("content"=>$c) ) );
		
		parent::addChild( $header );
	}
	
	public function addRow( $arData )
	{
		$row = new spTableRow;
		
		foreach ( $arData as $c )
			$row->addChild( new spTableData( array("content"=>$c) ) );
		
		parent::addChild( $row );
	}
	
	public function addRowChilds( $arData )
	{
		$row = new spTableRow;
		
		foreach ( $arData as $c )
		{
			$d = new spTableData;
			$d->addChild( $c );
			$row->addChild( $d );
		}
		
		parent::addChild( $row );
	}
}

?>